<%= provide(:title, "Search") %>
<%= form_tag("index", :method => "get", :id => "searchform") do %>
  <%= label_tag(:title, "Search for:") %>
  <%= text_field_tag(:title) %>
   <div id="sub"><a href="#" class="btn">Search</a></div>
<% end %>
<%= provide(:title, "Items List") %>
<div id="display_res">
<div id="res">
<table class="table table-striped table-bordered"> 
	<thread>
		<tr>
			<th>Image</th>
			<th>Title</th>
			<th>Price</th>
			<th>Type</th>
			<th>Negociation</th>
			<th>Sending</th>
			<th>Description</th>
		</tr>
	</thread>
	<tbody>
		<% if @items %>
		<% @items.each do |item| %>
			<tr>
				<td><%= image_tag item.picture.url, :size => "150x150" %></td>
				<td><%= link_to item.title, item %></td>
				<td><%= item.price %> Eur</td>
				<td><% if item.product %>Product<% else %>Service<% end %></td>
				<td><% if item.negociate %>Possible<% else %>Not negociable<% end %></td>
				<td><% if item.sending %>Can be send<% else %>Pick-up only<% end %></td>
				<td ><div class="description-row"><%= item.description %></div></td>
			</tr>
		<% end %>
		<% end %>
	</tbody>
</table>
</div>
</div>
<div class="pagination">
	<ul>
	<% for i in 1..10%>
		<li><a href="#" ><%= i %></a></li>
	<% end %>
	</ul>
</div>